#include "qcolorbutton.h"
#include "qcolorbuttonplugin.h"

#include <QtCore/QtPlugin>

QColorButtonPlugin::QColorButtonPlugin(QObject *parent)
    : QObject(parent)
{
    m_initialized = false;
}

void QColorButtonPlugin::initialize(QDesignerFormEditorInterface * /* core */)
{
    if (m_initialized)
        return;
    
    // Add extension registrations, etc. here
    
    m_initialized = true;
}

bool QColorButtonPlugin::isInitialized() const
{
    return m_initialized;
}

QWidget *QColorButtonPlugin::createWidget(QWidget *parent)
{
    return new QColorButton(parent);
}

QString QColorButtonPlugin::name() const
{
    return QLatin1String("QColorButton");
}

QString QColorButtonPlugin::group() const
{
    return QLatin1String("Els meus widgets");
}

QIcon QColorButtonPlugin::icon() const
{
    return QIcon();
}

QString QColorButtonPlugin::toolTip() const
{
    return QLatin1String("");
}

QString QColorButtonPlugin::whatsThis() const
{
    return QLatin1String("");
}

bool QColorButtonPlugin::isContainer() const
{
    return false;
}

QString QColorButtonPlugin::domXml() const
{
    return QLatin1String("<widget class=\"QColorButton\" name=\"qColorButton\">\n</widget>\n");
}

QString QColorButtonPlugin::includeFile() const
{
    return QLatin1String("qcolorbutton.h");
}

Q_EXPORT_PLUGIN2(qcolorbuttonplugin, QColorButtonPlugin)
